package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.client.Client;

public class BankService {
	public static void addClient(Bank bank, Client client) throws Exception {
		bank.addClient(client);
	}

	public static void printBalance(Bank bank) {
		System.out.println("Balance:");
		for (int i = 0; i < bank.getCountClients(); i++) {
			Client client = bank.getClients()[i];
			System.out.println("Client[" + (i+1) + "]: " + client);
		}
	}
	
	public static void printMaximumAmountToWithdraw(Bank bank) {
		System.out.println("Maximum amount to withdraw:");
		for (int i = 0; i < bank.getCountClients(); i++) {
			Client client = bank.getClients()[i];
			System.out.println("Client[" + (i+1) + "]: " + client);
		}
	}
}
